#!/usr/bin/env python
# encoding: utf-8
'''
@author: 王震
@license: 四川凡狼科技有限公司
@contact: 2668985108@qq.com
@file: resp.py
@time: 2021/10/1 8:59 上午
@desc:
'''
from flask import jsonify
import time


def response_json(code=0, msg='operation succeeded', data=None):
    if data is None:
        data = []
    return jsonify(code=code, data=data, msg=msg, time=time.time())


def response_list_json(data, page_number, page_size, code=0, msg='operation succeeded'):
    return jsonify(code=code, data=data, pageNumber=page_number, pageSize=page_size, msg=msg, time=time.time())
